package model;

import java.util.Date;

public class Grade {
    private int id;
    private int studentId;
    private String studentNo;
    private String studentName;
    private String className;
    private int subjectId;
    private String subjectName;
    private double score;
    private String examType;
    private Date examDate;
    private Date createdAt;
    private int rank;
    private double averageScore;
    private double credits; // 学分
    private String majorName;    // 添加专业名称字段
    
    public Grade() {}
    
    public Grade(int id, int studentId, String studentNo, String studentName, 
            String className, int subjectId, String subjectName, double score, 
            String examType, Date examDate, Date createdAt) {
        this.id = id;
        this.studentId = studentId;
        this.studentNo = studentNo;
        this.studentName = studentName;
        this.className = className;
        this.subjectId = subjectId;
        this.subjectName = subjectName;
        this.score = score;
        this.examType = examType;
        this.examDate = examDate;
        this.createdAt = createdAt;
    }
    
    // Getters and Setters
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }
    
    public int getStudentId() { return studentId; }
    public void setStudentId(int studentId) { this.studentId = studentId; }
    
    public String getStudentNo() { return studentNo; }
    public void setStudentNo(String studentNo) { this.studentNo = studentNo; }
    
    public String getStudentName() { return studentName; }
    public void setStudentName(String studentName) { this.studentName = studentName; }
    
    public String getClassName() { return className; }
    public void setClassName(String className) { this.className = className; }
    
    public int getSubjectId() { return subjectId; }
    public void setSubjectId(int subjectId) { this.subjectId = subjectId; }
    
    public String getSubjectName() { return subjectName; }
    public void setSubjectName(String subjectName) { this.subjectName = subjectName; }
    
    public double getScore() { return score; }
    public void setScore(double score) { this.score = score; }
    
    public String getExamType() { return examType; }
    public void setExamType(String examType) { this.examType = examType; }
    
    public Date getExamDate() { return examDate; }
    public void setExamDate(Date examDate) { this.examDate = examDate; }
    
    public Date getCreatedAt() { return createdAt; }
    public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; }
    
    public int getRank() { return rank; }
    public void setRank(int rank) { this.rank = rank; }
    
    public double getAverageScore() { return averageScore; }
    public void setAverageScore(double averageScore) { this.averageScore = averageScore; }
    
    public double getCredits() { return credits; }
    public void setCredits(double credits) { this.credits = credits; }
    
    public String getMajorName() { 
        return majorName; 
    }
    
    public void setMajorName(String majorName) { 
        this.majorName = majorName; 
    }
} 